public class Date {
    public int year;
    public  int month;
    public  int day;

//    public void setDate(int y,int m,int d){
//        year =y;
//        month=m;
//        day=d;
//
//    }

    //形参自己给自己赋值，打印错误
//    public void setDate(int year,int month,int day){
//        year =year;
//        month=month;
//        day=day;
//
//    }

        public void setDate(int year,int month,int day){
            this.year =year;
            this.month=month;
            this.day=day;

    }

    public void printDate(){
        System.out.println(year+"年"+month+"月"+day+"日");
    }

    public  Date(){
            this(1999,3,5);

    }

    public Date(int year,int month,int day){
            this.year=year;
           this.month=month;
           this.day=day;
    }

    public static void main(String[] args) {
        Date date=new Date();
        date.printDate();
    }



    public static void main1(String[] args) {
        Date date=new Date();
        date.setDate(1999,2,4);
        date.printDate();


        Date date2=new Date();
        date2.setDate(2333,7,4);
        date2.printDate();
    }
}
